Skip to content

Conversation

@artsooter
Copy link

hello ,This PR is aims to add this feature in #2002

Problem background

We encountered two problems in the issue.

  • How to set the maximum value of the Radar Chart to a specified value.
  • How to display the maximum tick value on the chart.

Solution

This PR introduces two new parameters to RadarChartData:

  1. maxValue Parameter

RadarChartData( dataSets: myDataSets, maxValue: 100.0, // Set custom maximum value )

  • Type: double? (optional)
  • Default: null (uses data maximum)
  • Purpose: Allows setting a custom maximum value instead of calculating from data
  1. showMaxTick Parameter

RadarChartData( dataSets: myDataSets, showMaxTick: true, // Show maximum tick value )

  • Type: bool
  • Default: false (preserves existing behavior)
  • Purpose: Controls whether the maximum tick is displayed on the chart

Result

image

@imaNNeo
Copy link
Owner

imaNNeo commented Oct 26, 2025

Hi, thanks for your great contribution!
I have some points to mention.

  1. I think instead of having a showMaxTick, we can have a checkToShowTick resolver that the user can decide to show which ticks (it can be like a callback, like checkToShowDot in LineChartData). This way, we can hide the max entry by default (to be backward compatible), also it adds a lot of customizability for other use cases.
  2. I like the change for the maxValue property, thanks a lot. I was thinking to have something for minValue as well (but not for now, let's keep this PR as simple as possible). But if you found time in the future, I would appreciate if you add the minValue as well to keep the consistency.
  3. Please add the newly added property in the radar_chart.md file.

Then we're good to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants